/*
 Navicat Premium Data Transfer

 Source Server         : shop
 Source Server Type    : MySQL
 Source Server Version : 50725
 Source Host           : localhost:3306
 Source Schema         : shop_exam

 Target Server Type    : MySQL
 Target Server Version : 50725
 File Encoding         : 65001

 Date: 16/11/2024 14:38:23
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cname` varchar(255) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of category
-- ----------------------------
BEGIN;
INSERT INTO `category` VALUES (1, '文具');
INSERT INTO `category` VALUES (2, '图书');
INSERT INTO `category` VALUES (3, '运动');
INSERT INTO `category` VALUES (4, '娱乐');
COMMIT;

-- ----------------------------
-- Table structure for product
-- ----------------------------
DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `price` float DEFAULT NULL,
  `cid` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of product
-- ----------------------------
BEGIN;
INSERT INTO `product` VALUES (1, '铅笔', 1.5, 1);
INSERT INTO `product` VALUES (2, '钢笔', 45.6, 1);
INSERT INTO `product` VALUES (3, '橡皮', 0.5, 1);
INSERT INTO `product` VALUES (4, '写字本', 1, 2);
INSERT INTO `product` VALUES (5, '书皮', 7.5, 2);
INSERT INTO `product` VALUES (6, '贴贴画', 2.9, 4);
INSERT INTO `product` VALUES (7, '跳绳', 8.8, 3);
INSERT INTO `product` VALUES (10, '小书1', 12.6, 1);
INSERT INTO `product` VALUES (11, '小书2', 12.6, 1);
INSERT INTO `product` VALUES (12, '小书3', 12.6, 1);
INSERT INTO `product` VALUES (14, 'aaaaa', 11, 2);
INSERT INTO `product` VALUES (15, 'bbb', 123456, 2);
INSERT INTO `product` VALUES (16, 'bbb', 123, 1);
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(200) COLLATE utf8_bin NOT NULL,
  `password` varchar(200) COLLATE utf8_bin NOT NULL,
  `salt` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `avatar` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES (1, 'admin', '123456', 'Zjitc', NULL);
INSERT INTO `user` VALUES (2, 'lisi', '666666', 'Zjitc', NULL);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
